<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const xhr = new XMLHttpRequest()
        xhr.open('GET', 'http://hmajax.itheima.net/api/province')
        xhr.addEventListener('loadend',()=>{
            console.log(JSON.parse(xhr.response));
            document.body.innerHTML = JSON.parse(xhr.response).list.map(item => item).join("<br>")
        })
        xhr.send()
    </script>
</body>
</html>